{% extends 'blog/meta.twig' %}

{% block meta_body %}
    <style>
        h1 {
            z-index: 1;
            position: absolute;
            top: 20px;
            right: -50px;
            width: 500px;
        }

        pre {
            width: 1000px;
            top: 10px;
            left: 100px;
            margin-left: 0;
            position: absolute;
            z-index: 0;
            font-size: 22px;
        }

        .meta-footer {
            padding-top: 10px;
        }
    </style>

    <h1>
        <span>New in </span><br><span>PHP 8</span>
    </h1>


    <pre><code class="language-php hljs php"><span class="hljs-comment">#[<span class="hljs-highlight  type">InitilizedBy</span>(<span class="hljs-highlight  type">RouterInitializer</span>::class)]</span>
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Router</span>
</span>{
    <span class="hljs-keyword">public</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">__construct</span><span class="hljs-params">(
        <span class="hljs-highlight  keyword">public</span> <span class="hljs-highlight  type">RouteCollector|Collector</span> <span class="hljs-highlight  prop">$collector</span>
    )</span> </span>{}
}


$router-&gt;<span class="hljs-highlight  prop">handle</span>(
    <span class="hljs-highlight  prop">id</span>: $id,
    <span class="hljs-highlight  prop">body</span>: $body,
);</code></pre>

{% endblock %}
